import React,{Component,ProtoTypes} from 'react'
import style from './formDialog.scss'

class FormDialog extends Component{
    render(){
        return (
            <div className="fd-wrapper">
                <i className="pi-icon pi-icon-edit" onClick={this.props.onClick}></i>
                <div className="fd-mask" style={{display:this.props.fstyle?this.props.fstyle:'none'}}></div>
                <div className="fd-box" style={{display:this.props.fstyle?this.props.fstyle:'none'}}>
                    <div className="fd-body">
                    <div className="fd-title">
                        {this.props.title?this.props.title:'表单'}
                        <i className="pi-icon pi-icon-close" onClick={this.props.onCancel}></i>
                    </div>
                    <div className="fd-content">
                        <input type="text" />
                    </div>
                    <div className="fd-btnbox">
                        <div className="fd-btn-l">
                            <button type="button" className="pi-btn pi-btn-l pi-btn-white-br" onClick={this.props.onCancel}>取消</button>
                        </div>
                        <div className="fd-btn-r">
                            <button type="button" className="pi-btn pi-btn-l pi-btn-orange" onClick={this.props.onSubmit}>确定</button>
                        </div>
                    </div>
                    </div>
                </div>
            </div>
        )
    }
}

export default FormDialog
